package com.gong.DesignPattern.ProxyPattern.static1;

/**
 * @author GongChang
 * @version 1.0
 * @date 2021/6/22 0022 8:43
 */
public class ProxyBuy implements Buy {

    private Buy buy;

    public ProxyBuy(Buy buy) {
        this.buy = buy;
    }

    @Override
    public void buy() {
        System.out.println("买房前");
        buy.buy();
        System.out.println("买房后");
    }

    @Override
    public void sell() {

    }
}
